package model

import "gorm.io/gorm"

type Comment struct {
	gorm.Model
	UserId   int    `gorm:"type:int;not null"`
	GoodsId  int    `gorm:"type:int;not null"`
	Comments string `gorm:"type:varchar(30);not null"`
}

func (c *Comment) CommentAdd(db *gorm.DB) error {
	return db.Debug().Create(c).Error
}
